package com.tpp.controller;

import com.tpp.pojo.baseVo.BaseResult;
import com.tpp.service.EduSearchService;
import com.tpp.pojo.baseVo.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Package: com.myh.controller
 * @ClassName: SearchController
 * @Author: myh
 * @CreateTime: 2021/8/28 11:52
 * @Description:
 */

@RestController
@RequestMapping("/search")
public class SearchController {

//    searchservice 会命名冲突
    @Autowired
    EduSearchService eduSearchService;

    @RequestMapping("/search")
    public BaseResult search(@RequestParam("key")String key, @RequestParam("page") Integer page, @RequestParam("size") Integer size){
        return eduSearchService.search(key,page,size);
    }
}
